<include file="public/layout" />

<body style="background-color: #FFF; overflow: auto;">

<div id="toolTipLayer" style="position: absolute; z-index: 9999; display: none; visibility: visible; left: 95px; top: 573px;"></div>

<div id="append_parent"></div>

<div id="ajaxwaitid"></div>

<div class="page">

    <div class="fixed-bar">

        <div class="item-title"><a class="back" href="javascript:history.back();" title="返回列表"><i class="fa fa-arrow-circle-o-left"></i></a>

            <div class="subject">

                <h3>微信信息配置模板 - 编辑模板</h3>

                <h5>网站系统微信信息配置模板管理</h5>

            </div>

        </div>

    </div>

    <form class="form-horizontal" id="addEditSmsTemplate" method="post">

        <div class="ncap-form-default">

            <dl class="row">

                <dt class="tit">

                    <label for="sms_sign"><em>*</em>微信信息标题</label>

                </dt>

                <dd class="opt">

                    <input type="text" value="{$smsTpl.sms_sign}" name="sms_sign" id="sms_sign" class="input-txt">

                    <span class="err" id="err_sms_sign" style="display:none;">微信信息标题不能为空 </span>

                </dd>

            </dl>

            <dl class="row">

                <dt class="tit">

                    <label for="sms_tpl_code"><em>*</em>微信信息模板ID</label>

                </dt>

                <dd class="opt">

                    <input type="text" value="{$smsTpl.sms_tpl_code}" name="sms_tpl_code" id="sms_tpl_code" class="input-txt">

                    <span id="err_sms_tpl_code" class="err" style="display:none;">微信信息模板ID不能为空</span>
                    
                </dd>

            </dl>

            <dl class="row">

                <dt class="tit">

                    <label for="tpl_content"><em>*</em>微信信息内容</label>

                </dt>

                <dd class="opt">

                    <textarea id="tpl_content" name="tpl_content" class="tarea" rows="6">{$smsTpl.tpl_content}</textarea>

                    <span class="err" id="err_tpl_content" style="display:none;">微信信息内容不能为空</span>

                </dd>

            </dl>

            <div class="bot"><a href="JavaScript:void(0);" onclick="checkForm();" class="ncap-btn-big ncap-btn-green" id="submitBtn">确认提交</a></div>

        </div>

        <input type="hidden" name="tpl_id" value="{$smsTpl.tpl_id}"></label>

    </form>

</div>

<script type="text/javascript">

    // 判断输入框是否为空

    function checkForm(){

        var smsSign = $("#addEditSmsTemplate").find("input[name='sms_sign']").val();					//短信签名

        var tplContent = $("#addEditSmsTemplate").find("textarea[name='tpl_content']").val();			//模板内容



        var sendscene = $("#send_scene option:selected").val();

        if($.trim(smsSign) == '')

        {

            $("#err_sms_sign").show();

            return false;

        }


        if($.trim(tplContent) == '')

        {

            $("#err_tpl_content").show();

            return false;

        }



        if(sendscene == -1){

            $("#err_send_scene").show();

            return false;

        }

        $('#addEditSmsTemplate').submit();

    }

</script>

</body>

</html>